pow
Exponential expressions
The pow()
function returns to the y power of x .
<?php echo pow ( 4 , 2 ) ; echo pow ( 6 , 2 ) ; echo pow ( - 6 , 2 ) ; echo pow ( - 6 , - 2 ) ; echo pow ( - 6 , 5.5 ) ; ?>
Try it yourself
pow ( x , y )
parameter | describe |
---|---|
x | Required. A number. |
y | Required. A number. |
Returns the power of x to the y power. If possible, this function returns integer.
If the power cannot be calculated, a warning will be issued and pow()
will return false. PHP version 4.2.0 starts with pow()
and does not generate any warnings.